package top.banner.contentcenter.controller.content;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.banner.contentcenter.auth.CheckLogin;
import top.banner.contentcenter.domain.dto.content.ShareDTO;
import top.banner.contentcenter.service.content.ShareService;

import javax.annotation.Resource;

/**
 * @author XGL
 */
@RestController
@RequestMapping("/shares")
public class ShareController {


    @Resource
    private ShareService shareService;

    @CheckLogin
    @GetMapping("/{id}")
    public ShareDTO findById(@PathVariable Integer id) {
        return shareService.findById(id);
    }
}
